#ifndef LEVEL_CHANGE_SUBJECT_H
#define LEVEL_CHANGE_SUBJECT_H

#include <vector>

#include "SFML/System.hpp"

class Level;
class LevelChangeListener;

class LevelChangeSubject
{
public:
    virtual ~LevelChangeSubject();

    LevelChangeSubject& operator=(const LevelChangeSubject& rhs);

    virtual void registerListener(LevelChangeListener* listener);
    virtual void unregisterListener(LevelChangeListener* listener);
protected:
    virtual void notifyListenersStarted();
    virtual void notifyListenersIntermission(
        bool isFirstLoaded, Level& level, const sf::Vector2f& entryPoint);
    virtual void notifyListenersFinished();

    typedef std::vector<LevelChangeListener*> listener_vec;
    typedef listener_vec::iterator listener_it;

    listener_vec listeners;
};

#endif